import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { start, close } from '@/utils/nprogress'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import * as echarts from 'echarts'
import dataV from '@jiaminghi/data-view'

Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
Vue.use(ElementUI).use(dataV)

// 路由拦截
router.beforeEach((to, from, next) => {
  start()
  next()
})
router.afterEach(() => {
  close()
})

Vue.prototype.$mapConf = {id:0, name:''}
Vue.prototype.$lastMapConf = {id:0, name:''}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
